package com.yangguang.huahui.net;

import java.io.File;
import java.io.IOException;

import okhttp3.MediaType;
import okhttp3.RequestBody;
import retrofit2.Converter;

/**
 * Created by Administrator on 2017/3/8.
 */

public class FileRequestBodyConverter implements Converter<File, RequestBody> {

    @Override
    public RequestBody convert(File file) throws IOException {
        return RequestBody.create(MediaType.parse("multipart/form-data"), file);
    }
}
